package components.player
{
	import UIFree.uif_component;
	import UIFree.uif_draw;
	
	import components.c_component;
	
	import flash.events.MouseEvent;
	import flash.geom.Rectangle;
	
	public class c_panelButton extends c_component {
		public function c_panelButton(parent:uif_component, ax:int=0, ay:int=0, awidth:int=0, aheight:int=0, styleClass:Object='', onClick: Function=null) {
			super(parent, ax, ay, awidth, aheight, styleClass);
			if (onClick != null) 
				addEvent(MouseEvent.CLICK, onClick);
		}
		
		override protected function paint(a_styleClass: String, a_method: String = uif_draw.DRAWRECTMETHOD): void {
			super.paint(a_styleClass, a_method);
			var rect: Rectangle = getInner();
			this.drawPath(rect.x, rect.y, rect.width, rect.height, style.path);
		}
	}
}